
package com.example.demo.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import java.io.Serializable;
@Data
@Document(type = "blog",indexName = "blog")//文档
public class EsBlog implements Serializable {
    @Id//主键
    private String id;
    private String title;
    private String summary;
    private String content;
    protected EsBlog() {//jpa规范

    }
    public EsBlog(String title, String summary, String content) {
        this.title = title;
        this.summary = summary;
        this.content = content;
    }
}
